package mac5855.app.controllers;

import java.io.Serializable;

import mac5855.app.dao.CategoriaDAO;
import mac5855.app.dao.DAOFactory;
import mac5855.app.models.Categoria;
import sun.reflect.generics.reflectiveObjects.NotImplementedException;

public class HomeBean implements Serializable {
	private static final long serialVersionUID = 1L;

	public String getError() {
		throw new NotImplementedException();
	}

	public String getCurrentTimeMillis() {
		return "" + System.currentTimeMillis();
	}

	public Categoria[] getCategorias() {
		CategoriaDAO dao = DAOFactory.getDAOFactory(DAOFactory.JDBC).getCategoriaDAO();
		return dao.findAll();
	}
}
